package com.li.shop.controller;

import com.li.shop.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/page")
public class toPage {
    @RequestMapping("/adr1")//wang
    public String address1() {
//        return "before/person/addresstest";
        return "before/person/address";
    }

    @RequestMapping("/adminzhuce")
    public String adminzhuce() {
        return "back/adminregister";
    }

    @RequestMapping("welcome")
    public String welcome() {
        return "back/indextest";
    }

    @RequestMapping("/adminlogin")
    public String adminlogin() {
        return "back/adminlogin";
    }

    @RequestMapping("/login")
    public String login() {
        return "back/login";
    }

    @RequestMapping("/manager")
    public String product_left() {
        return "back/1";
    }

    //主页显示
    @RequestMapping(value = "/home")
    public String detail() {
        return "redirect:/product/list";
    }

    @RequestMapping(value = "test")
    public String test() {
        return "/index";
    }

    //个人中心
    @RequestMapping(value = "/person")
    public String person() {
        return "/before/person/index";
    }

    //订单管理
    @RequestMapping(value = "/ordermanagement", method = RequestMethod.GET)
    public String ordermanagement() {
        return "redirect:/product/ordershow";
    }

    @RequestMapping("exit")
    public String exit() {
        return "back/login";
    }


    @RequestMapping("/message")
    public String message() {
        return "before/introductionbark";
    }

    @RequestMapping("/list")
    public String list() {
        return "redirect:/Dictionary/dictionary_list";
    }

    @RequestMapping("go")
    public String go() {
        return "back/register";
    }

    @RequestMapping("/payafter")
    public String payafter() {
        return "before/payafter";
    }

    @RequestMapping("/return")
    public String back(HttpSession session, User user) {
        session.setAttribute("session_user", user);
        return "redirect:/user/loginafter";
    }
  @RequestMapping("/this")
    public String thisr()
    {
        return "before/in";
    }
}
